package com.binest.investorInclusionMain.service.impl;

import java.util.List;
import com.binest.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.binest.investorInclusionMain.mapper.InvestorInclusionMainMapper;
import com.binest.investorInclusionMain.domain.InvestorInclusionMain;
import com.binest.investorInclusionMain.service.IInvestorInclusionMainService;

/**
 * 投资机构收录主Service业务层处理
 * 
 * @author wwd
 * @date 2024-01-23
 */
@Service
public class InvestorInclusionMainServiceImpl implements IInvestorInclusionMainService 
{
    @Autowired
    private InvestorInclusionMainMapper investorInclusionMainMapper;

    /**
     * 查询投资机构收录主
     * 
     * @param id 投资机构收录主主键
     * @return 投资机构收录主
     */
    @Override
    public InvestorInclusionMain selectInvestorInclusionMainById(String id)
    {
        return investorInclusionMainMapper.selectInvestorInclusionMainById(id);
    }

    /**
     * 查询投资机构收录主列表
     * 
     * @param investorInclusionMain 投资机构收录主
     * @return 投资机构收录主
     */
    @Override
    public List<InvestorInclusionMain> selectInvestorInclusionMainList(InvestorInclusionMain investorInclusionMain)
    {
        return investorInclusionMainMapper.selectInvestorInclusionMainList(investorInclusionMain);
    }

    /**
     * 新增投资机构收录主
     * 
     * @param investorInclusionMain 投资机构收录主
     * @return 结果
     */
    @Override
    public int insertInvestorInclusionMain(InvestorInclusionMain investorInclusionMain)
    {
        investorInclusionMain.setCreateTime(DateUtils.getNowDate());
        return investorInclusionMainMapper.insertInvestorInclusionMain(investorInclusionMain);
    }

    /**
     * 修改投资机构收录主
     * 
     * @param investorInclusionMain 投资机构收录主
     * @return 结果
     */
    @Override
    public int updateInvestorInclusionMain(InvestorInclusionMain investorInclusionMain)
    {
        investorInclusionMain.setUpdateTime(DateUtils.getNowDate());
        return investorInclusionMainMapper.updateInvestorInclusionMain(investorInclusionMain);
    }

    /**
     * 批量删除投资机构收录主
     * 
     * @param ids 需要删除的投资机构收录主主键
     * @return 结果
     */
    @Override
    public int deleteInvestorInclusionMainByIds(String[] ids)
    {
        return investorInclusionMainMapper.deleteInvestorInclusionMainByIds(ids);
    }

    /**
     * 删除投资机构收录主信息
     * 
     * @param id 投资机构收录主主键
     * @return 结果
     */
    @Override
    public int deleteInvestorInclusionMainById(String id)
    {
        return investorInclusionMainMapper.deleteInvestorInclusionMainById(id);
    }

    @Override
    public int addLikeCount(String id) {
        return investorInclusionMainMapper.addLikeCount(id);
    }

    @Override
    public int reduceLikeCount(String id) {
        return investorInclusionMainMapper.reduceLikeCount(id);
    }

    @Override
    public int addNoLikeCount(String id) {
        return investorInclusionMainMapper.addNoLikeCount(id);
    }

    @Override
    public int reduceNoLikeCount(String id) {
        return investorInclusionMainMapper.reduceNoLikeCount(id);
    }
}
